package org.swfer.UIC 
{
	import flash.display.DisplayObject;
	import flash.filters.ColorMatrixFilter;
	
	
	/**
	 * 设置控件是否可用。不可用状态灰色。屏蔽鼠标事件
	 * @author swfer
	 * @param	target
	 * @param	boo
	 */
	public function setEnabled (target:DisplayObject,boo:Boolean):void
	{
		target.filters = (boo == false)?[new ColorMatrixFilter([0.3, 0.6, 0, 0, 0, 0.3, 0.6, 0, 0, 0, 0.3, 0.6, 0, 0, 0, 0, 0, 0, 1, 0])]:null;
		if (target.hasOwnProperty('mouseEnabled')) target['mouseEnabled'] = boo;
	}

}